package com.mysoft.gfyx.clue.dao.dto;

import com.mysoft.framework.common.exception.BusinessLogicException;
import com.mysoft.gfyx.clue.mip.dto.SearchBaseRequestDto;
import lombok.Data;

import java.util.UUID;

@Data
public class MyClueRequestDto extends SearchBaseRequestDto {

    private UUID clueId;

    private UUID userId;

    private Integer page;

    private Integer pageSize;

    private Integer offset;

    private String keyword;

    private String areaCategoryCode;

    private String provinceCode;

    private String clueStatus;

    private String creditCode;

    private String clueResponsiblePersonGUID;

    protected void setFilterByField(String field, String operatorType, Object value) {
        switch (field) {
            case "ProvinceCode":
                if (value.toString().equals("[0]")) {
                    this.setProvinceCode("");
                } else {
                    this.dynamicSetProperty(field, value);
                }
                break;
            default:
                this.dynamicSetProperty(field, value);
        }
    }
}
